//
//  GuideViewController.m
//  LiquorChain
//
//  Created by apple on 2018/12/27.
//  Copyright © 2018年 王冬. All rights reserved.
//

#import "GuideViewController.h"
#import "GuideViewCell.h"
#import "MVPlayerController.h"
@interface GuideViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong) UITableView *tableView;
@end

@implementation GuideViewController
static NSString *CellIdentifier = @"guidCell";
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"商学院/操作指南";
    self.view.backgroundColor =[UIColor groupTableViewBackgroundColor];
    self.tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, kNavBarHeight +15, SCREEN_WIDTH, SCREEN_HEIGHT-kNavBarHeight-kIPhoneXBottomHeight-15) style:UITableViewStylePlain];
    
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    //[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
    [self.tableView registerNib:[UINib nibWithNibName:@"GuideViewCell" bundle:nil] forCellReuseIdentifier:CellIdentifier];
    [self.view addSubview:self.tableView];
    // Do any additional setup after loading the view.
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    GuideViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    cell.selectionStyle =  UITableViewCellSelectionStyleNone;
    return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 135;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    MVPlayerController *mvVC =[[MVPlayerController alloc]init];
    
    [self.navigationController pushViewController:mvVC animated:YES];
}

@end
